gpio: mvebu: only fail on missing clk if pwm is actually to be used
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 17 Dec 2018 08:30:10 +0000 (09:30 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Sat, 22 Dec 2018 08:06:45 +0000 (08:06 +0000)
commitf1af8b4afa976c37367aad93c7c1f5e6c61d0c41
treed62bcdd764de0c665e7dbfa51718c2070ee93b7e
parent068a7e652cb6445002c39c3329b7a6acb11ea09e
gpio: mvebu: only fail on missing clk if pwm is actually to be used

The gpio IP on Armada 370 at offset 0x18180 has neither a clk nor pwm
registers. So there is no need for a clk as the pwm isn't used anyhow.
So only check for the clk in the presence of the pwm registers. This fixes
a failure to probe the gpio driver for the above mentioned gpio device.

Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Gbp-Pq: Topic bugfix/arm
Gbp-Pq: Name gpio-mvebu-only-fail-on-missing-clk-if-pwm-is-actual.patch
drivers/gpio/gpio-mvebu.c